Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] core: group reduction using union find #187

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

yliang412
Copy link
Member

@yliang412 yliang412 commented Oct 14, 2024

The PR uses union-find to maintain group equivalence. This is done by maintaining

  • a DisjointSet of group ids
  • representative group id to Group mapping.

The "path compression" done during union operation speeds up tpch sqlplannertest run from ~89s to ~9s on local machine.

TODO

  • Better to have a Map<GroupId, Group> interface without thinking about reduced group. We can use DisjointGroup to replace get_reduced_group_id, Memo::groups::..., and Memo::merge_group functionalities.

Also improve tpch sqlplannertest run from ~89s to ~9s.

Signed-off-by: Yuchen Liang <[email protected]>
Signed-off-by: Yuchen Liang <[email protected]>
Signed-off-by: Yuchen Liang <[email protected]>
Signed-off-by: Yuchen Liang <[email protected]>
Signed-off-by: Yuchen Liang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant